Exodus 21:8

If she does not please her master, who has designated her for himself, then he shall let her be redeemed. He shall have no right to sell her to a foreign people, since he has broken faith with her.

Exodus 21:9

If he designates her for his son, he shall deal with her as with a daughter.